Integrand size = 25, antiderivative size = 116 \[ \int \frac {\cot ^3(e+f x)}{\sqrt {a+b \tan ^2(e+f x)}} \, dx=\frac {(2 a+b) \text {arctanh}\left (\frac {\sqrt {a+b \tan ^2(e+f x)}}{\sqrt {a}}\right )}{2 a^{3/2} f}-\frac {\text {arctanh}\left (\frac {\sqrt {a+b \tan ^2(e+f x)}}{\sqrt {a-b}}\right )}{\sqrt {a-b} f}-\frac {\cot ^2(e+f x) \sqrt {a+b \tan ^2(e+f x)}}{2 a f} \]
[Out]
Time = 0.19 (sec) , antiderivative size = 116, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.240, Rules used = {3751, 457, 105, 162, 65, 214} \[ \int \frac {\cot ^3(e+f x)}{\sqrt {a+b \tan ^2(e+f x)}} \, dx=\frac {(2 a+b) \text {arctanh}\left (\frac {\sqrt {a+b \tan ^2(e+f x)}}{\sqrt {a}}\right )}{2 a^{3/2} f}-\frac {\text {arctanh}\left (\frac {\sqrt {a+b \tan ^2(e+f x)}}{\sqrt {a-b}}\right )}{f \sqrt {a-b}}-\frac {\cot ^2(e+f x) \sqrt {a+b \tan ^2(e+f x)}}{2 a f} \]
[In]
[Out]
Rule 65
Rule 105
Rule 162
Rule 214
Rule 457
Rule 3751
Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {1}{x^3 \left (1+x^2\right ) \sqrt {a+b x^2}} \, dx,x,\tan (e+f x)\right )}{f} \\ & = \frac {\text {Subst}\left (\int \frac {1}{x^2 (1+x) \sqrt {a+b x}} \, dx,x,\tan ^2(e+f x)\right )}{2 f} \\ & = -\frac {\cot ^2(e+f x) \sqrt {a+b \tan ^2(e+f x)}}{2 a f}-\frac {\text {Subst}\left (\int \frac {\frac {1}{2} (2 a+b)+\frac {b x}{2}}{x (1+x) \sqrt {a+b x}} \, dx,x,\tan ^2(e+f x)\right )}{2 a f} \\ & = -\frac {\cot ^2(e+f x) \sqrt {a+b \tan ^2(e+f x)}}{2 a f}+\frac {\text {Subst}\left (\int \frac {1}{(1+x) \sqrt {a+b x}} \, dx,x,\tan ^2(e+f x)\right )}{2 f}-\frac {(2 a+b) \text {Subst}\left (\int \frac {1}{x \sqrt {a+b x}} \, dx,x,\tan ^2(e+f x)\right )}{4 a f} \\ & = -\frac {\cot ^2(e+f x) \sqrt {a+b \tan ^2(e+f x)}}{2 a f}+\frac {\text {Subst}\left (\int \frac {1}{1-\frac {a}{b}+\frac {x^2}{b}} \, dx,x,\sqrt {a+b \tan ^2(e+f x)}\right )}{b f}-\frac {(2 a+b) \text {Subst}\left (\int \frac {1}{-\frac {a}{b}+\frac {x^2}{b}} \, dx,x,\sqrt {a+b \tan ^2(e+f x)}\right )}{2 a b f} \\ & = \frac {(2 a+b) \text {arctanh}\left (\frac {\sqrt {a+b \tan ^2(e+f x)}}{\sqrt {a}}\right )}{2 a^{3/2} f}-\frac {\text {arctanh}\left (\frac {\sqrt {a+b \tan ^2(e+f x)}}{\sqrt {a-b}}\right )}{\sqrt {a-b} f}-\frac {\cot ^2(e+f x) \sqrt {a+b \tan ^2(e+f x)}}{2 a f} \\ \end{align*}
Time = 0.83 (sec) , antiderivative size = 135, normalized size of antiderivative = 1.16 \[ \int \frac {\cot ^3(e+f x)}{\sqrt {a+b \tan ^2(e+f x)}} \, dx=\frac {\left (2 a^2-a b-b^2\right ) \text {arctanh}\left (\frac {\sqrt {a+b \tan ^2(e+f x)}}{\sqrt {a}}\right )+\sqrt {a} \left (-2 a \sqrt {a-b} \text {arctanh}\left (\frac {\sqrt {a+b \tan ^2(e+f x)}}{\sqrt {a-b}}\right )+(-a+b) \cot ^2(e+f x) \sqrt {a+b \tan ^2(e+f x)}\right )}{2 a^{3/2} (a-b) f} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. \(1179\) vs. \(2(98)=196\).
Time = 1.14 (sec) , antiderivative size = 1180, normalized size of antiderivative = 10.17
[In]
[Out]
none
Time = 0.32 (sec) , antiderivative size = 697, normalized size of antiderivative = 6.01 \[ \int \frac {\cot ^3(e+f x)}{\sqrt {a+b \tan ^2(e+f x)}} \, dx=\left [\frac {2 \, \sqrt {a - b} a^{2} \log \left (\frac {b \tan \left (f x + e\right )^{2} - 2 \, \sqrt {b \tan \left (f x + e\right )^{2} + a} \sqrt {a - b} + 2 \, a - b}{\tan \left (f x + e\right )^{2} + 1}\right ) \tan \left (f x + e\right )^{2} + {\left (2 \, a^{2} - a b - b^{2}\right )} \sqrt {a} \log \left (\frac {b \tan \left (f x + e\right )^{2} + 2 \, \sqrt {b \tan \left (f x + e\right )^{2} + a} \sqrt {a} + 2 \, a}{\tan \left (f x + e\right )^{2}}\right ) \tan \left (f x + e\right )^{2} - 2 \, \sqrt {b \tan \left (f x + e\right )^{2} + a} {\left (a^{2} - a b\right )}}{4 \, {\left (a^{3} - a^{2} b\right )} f \tan \left (f x + e\right )^{2}}, -\frac {4 \, a^{2} \sqrt {-a + b} \arctan \left (-\frac {\sqrt {b \tan \left (f x + e\right )^{2} + a} \sqrt {-a + b}}{a - b}\right ) \tan \left (f x + e\right )^{2} - {\left (2 \, a^{2} - a b - b^{2}\right )} \sqrt {a} \log \left (\frac {b \tan \left (f x + e\right )^{2} + 2 \, \sqrt {b \tan \left (f x + e\right )^{2} + a} \sqrt {a} + 2 \, a}{\tan \left (f x + e\right )^{2}}\right ) \tan \left (f x + e\right )^{2} + 2 \, \sqrt {b \tan \left (f x + e\right )^{2} + a} {\left (a^{2} - a b\right )}}{4 \, {\left (a^{3} - a^{2} b\right )} f \tan \left (f x + e\right )^{2}}, \frac {\sqrt {a - b} a^{2} \log \left (\frac {b \tan \left (f x + e\right )^{2} - 2 \, \sqrt {b \tan \left (f x + e\right )^{2} + a} \sqrt {a - b} + 2 \, a - b}{\tan \left (f x + e\right )^{2} + 1}\right ) \tan \left (f x + e\right )^{2} - {\left (2 \, a^{2} - a b - b^{2}\right )} \sqrt {-a} \arctan \left (\frac {\sqrt {b \tan \left (f x + e\right )^{2} + a} \sqrt {-a}}{a}\right ) \tan \left (f x + e\right )^{2} - \sqrt {b \tan \left (f x + e\right )^{2} + a} {\left (a^{2} - a b\right )}}{2 \, {\left (a^{3} - a^{2} b\right )} f \tan \left (f x + e\right )^{2}}, -\frac {2 \, a^{2} \sqrt {-a + b} \arctan \left (-\frac {\sqrt {b \tan \left (f x + e\right )^{2} + a} \sqrt {-a + b}}{a - b}\right ) \tan \left (f x + e\right )^{2} + {\left (2 \, a^{2} - a b - b^{2}\right )} \sqrt {-a} \arctan \left (\frac {\sqrt {b \tan \left (f x + e\right )^{2} + a} \sqrt {-a}}{a}\right ) \tan \left (f x + e\right )^{2} + \sqrt {b \tan \left (f x + e\right )^{2} + a} {\left (a^{2} - a b\right )}}{2 \, {\left (a^{3} - a^{2} b\right )} f \tan \left (f x + e\right )^{2}}\right ] \]
[In]
[Out]
\[ \int \frac {\cot ^3(e+f x)}{\sqrt {a+b \tan ^2(e+f x)}} \, dx=\int \frac {\cot ^{3}{\left (e + f x \right )}}{\sqrt {a + b \tan ^{2}{\left (e + f x \right )}}}\, dx \]
[In]
[Out]
\[ \int \frac {\cot ^3(e+f x)}{\sqrt {a+b \tan ^2(e+f x)}} \, dx=\int { \frac {\cot \left (f x + e\right )^{3}}{\sqrt {b \tan \left (f x + e\right )^{2} + a}} \,d x } \]
[In]
[Out]
\[ \int \frac {\cot ^3(e+f x)}{\sqrt {a+b \tan ^2(e+f x)}} \, dx=\int { \frac {\cot \left (f x + e\right )^{3}}{\sqrt {b \tan \left (f x + e\right )^{2} + a}} \,d x } \]
[In]
[Out]
Time = 0.44 (sec) , antiderivative size = 830, normalized size of antiderivative = 7.16 \[ \int \frac {\cot ^3(e+f x)}{\sqrt {a+b \tan ^2(e+f x)}} \, dx=\frac {\mathrm {atanh}\left (\frac {b^6\,\sqrt {b\,{\mathrm {tan}\left (e+f\,x\right )}^2+a}}{4\,\sqrt {a^3}\,\left (\frac {3\,a\,b^4}{2}+\frac {5\,b^5}{4}+\frac {b^6}{4\,a}\right )}+\frac {3\,b^4\,\sqrt {b\,{\mathrm {tan}\left (e+f\,x\right )}^2+a}}{2\,\sqrt {a^3}\,\left (\frac {3\,b^4}{2\,a}+\frac {5\,b^5}{4\,a^2}+\frac {b^6}{4\,a^3}\right )}+\frac {5\,b^5\,\sqrt {b\,{\mathrm {tan}\left (e+f\,x\right )}^2+a}}{4\,\sqrt {a^3}\,\left (\frac {3\,b^4}{2}+\frac {5\,b^5}{4\,a}+\frac {b^6}{4\,a^2}\right )}\right )\,\left (2\,a+b\right )}{2\,f\,\sqrt {a^3}}-\frac {b\,\sqrt {b\,{\mathrm {tan}\left (e+f\,x\right )}^2+a}}{2\,a\,\left (f\,\left (b\,{\mathrm {tan}\left (e+f\,x\right )}^2+a\right )-a\,f\right )}+\frac {\mathrm {atan}\left (\frac {\frac {\left (\frac {\frac {2\,a^2\,b^3\,f^2+2\,a\,b^4\,f^2}{2\,a^2\,f^3}-\frac {\sqrt {b\,{\mathrm {tan}\left (e+f\,x\right )}^2+a}\,\left (16\,a^2\,b^3\,f^2-32\,a^3\,b^2\,f^2\right )}{8\,a^2\,f^3\,\sqrt {a-b}}}{2\,f\,\sqrt {a-b}}-\frac {\sqrt {b\,{\mathrm {tan}\left (e+f\,x\right )}^2+a}\,\left (8\,a^2\,b^2+4\,a\,b^3+b^4\right )}{4\,a^2\,f^2}\right )\,1{}\mathrm {i}}{f\,\sqrt {a-b}}-\frac {\left (\frac {\frac {2\,a^2\,b^3\,f^2+2\,a\,b^4\,f^2}{2\,a^2\,f^3}+\frac {\sqrt {b\,{\mathrm {tan}\left (e+f\,x\right )}^2+a}\,\left (16\,a^2\,b^3\,f^2-32\,a^3\,b^2\,f^2\right )}{8\,a^2\,f^3\,\sqrt {a-b}}}{2\,f\,\sqrt {a-b}}+\frac {\sqrt {b\,{\mathrm {tan}\left (e+f\,x\right )}^2+a}\,\left (8\,a^2\,b^2+4\,a\,b^3+b^4\right )}{4\,a^2\,f^2}\right )\,1{}\mathrm {i}}{f\,\sqrt {a-b}}}{\frac {\frac {\frac {2\,a^2\,b^3\,f^2+2\,a\,b^4\,f^2}{2\,a^2\,f^3}-\frac {\sqrt {b\,{\mathrm {tan}\left (e+f\,x\right )}^2+a}\,\left (16\,a^2\,b^3\,f^2-32\,a^3\,b^2\,f^2\right )}{8\,a^2\,f^3\,\sqrt {a-b}}}{2\,f\,\sqrt {a-b}}-\frac {\sqrt {b\,{\mathrm {tan}\left (e+f\,x\right )}^2+a}\,\left (8\,a^2\,b^2+4\,a\,b^3+b^4\right )}{4\,a^2\,f^2}}{f\,\sqrt {a-b}}+\frac {\frac {\frac {2\,a^2\,b^3\,f^2+2\,a\,b^4\,f^2}{2\,a^2\,f^3}+\frac {\sqrt {b\,{\mathrm {tan}\left (e+f\,x\right )}^2+a}\,\left (16\,a^2\,b^3\,f^2-32\,a^3\,b^2\,f^2\right )}{8\,a^2\,f^3\,\sqrt {a-b}}}{2\,f\,\sqrt {a-b}}+\frac {\sqrt {b\,{\mathrm {tan}\left (e+f\,x\right )}^2+a}\,\left (8\,a^2\,b^2+4\,a\,b^3+b^4\right )}{4\,a^2\,f^2}}{f\,\sqrt {a-b}}-\frac {\frac {b^4}{2}+a\,b^3}{a^2\,f^3}}\right )\,1{}\mathrm {i}}{f\,\sqrt {a-b}} \]
[In]
[Out]